<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>缤格</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/binge.css"/>
    <script type="text/javascript" src="../../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../script/swiper.min.js"></script>
    <script type="text/javascript" src="../../script/mobile.js"></script>
    <script type="text/javascript">
        window['adaptive'].desinWidth = 750;
        window['adaptive'].baseFont = 28;
        window['adaptive'].maxWidth = 750;
        window['adaptive'].init();
    </script>
</head>

<body style="background: #fff;">



</body>

</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>

<script type="text/javascript">

    var imagesArr = [];
    var index = 0;
    var head_h = '';
    var UIPhotoViewer;
    apiready = function () {

        setFixStatusBar(); //设置状态栏
        keybackListener()
        imagesArr = api.pageParam.imagesArr;
        index = api.pageParam.index;
        head_h = api.pageParam.head_h;

        UIPhotoViewer = api.require('UIPhotoViewer');
        openPicViewer()

        api.addEventListener({
            name: 'imgView'
        }, function (ret, err) {
            UIPhotoViewer.close()
            api.closeFrame({
                name: 'imageViewBox'
            });
        });

    };

    function openFrame2() {
        var h = head_h + 30
        api.openFrame({
            name: 'imageView',
            url: '../index/imageView.html',
            rect: {
                x: 0,
                y: 0,
                w: 'auto',
                h: h
            },
            pageParam: {},
            bounces: false
        });
    }
    function openPicViewer() {

        UIPhotoViewer.open({
            images: imagesArr,
            placeholderImg: 'widget://icon/logo.png',
            bgColor: '#000',
            gestureClose: false,
        }, function(ret, err) {
            if (ret) {
                //alert(JSON.stringify(ret));
                /*UIPhotoViewer.setIndex({
                    index: index
                });*/

                openFrame2()

            } else {
                //alert(JSON.stringify(err));
            }
        });

    }


</script>
